#!/bin/bash
TOOLS="$HOME/.dotnet/tools"
if [[ ":$PATH:" != *":$TOOLS:"* ]]; then
    export PATH="$PATH:$TOOLS"
fi

if ! dotnet ef migrations remove --project StudentVideo.Data/StudentVideo.Data.csproj --startup-project StudentVideo/StudentVideo.csproj; then
    echo "Error: Failed to remove migration"
    exit 1
fi

echo "Migration removed successfully"
exit 0
